package com.polaris.live.adapter

import com.bumptech.glide.Glide
import com.polaris.live.common.adapter.BaseBindingAdapter
import com.polaris.live.common.adapter.VBViewHolder
import com.polaris.live.databinding.AdapterTaskRewardBinding
import com.polaris.live.resp.back_resp.UserTaskReward
import com.polaris.live.utils.image.ImageUtils

/**
 * TaskRewardAdapter
 *
 * @author Created by 天晴 on 2024/10/30/004 21:00
 */
class TaskRewardAdapter : BaseBindingAdapter<AdapterTaskRewardBinding, UserTaskReward>() {
    override fun convert(holder: VBViewHolder<AdapterTaskRewardBinding>, item: UserTaskReward) {
        Glide.with(context)
            .load(ImageUtils.imgPath(item.icon))
            .into(holder.vb.iconImg)
        holder.vb.text.text = item.text
        holder.vb.name.text = item.displayText
    }
}